<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/pre/header.jsp" %>
    <script src="${ctx}/statics/js/backend/backend.js"></script>
   <script type="text/javascript">
	
	function del(thisId){
		
				if(confirm("确认删除吗")){
			   window.location.href = "/1and5Demo/teacher/delTea?id="+thisId;
			  }
			  else{
			 
			   return;
			  }
			}
		
	
	

</script>
</head>
<body>
	<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>
		
<!--End Header End-->
<c:if test="${empty list}">
		<c:redirect url="/teacher/teacherList"></c:redirect>
    </c:if>
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
    <div class="m_content">
        <div class="m_right" id="content">
            <div class="mem_tit">教师列表</div>
            <p align="right">
                <a href="/1and5Demo/teacher/teacherList"  class="add_b">刷新</a>
                <br>
            </p>
            <br>
            <table border="0" class="order_tab" style="width:750px; text-align:center; margin-bottom:30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <td width="5%">教员ID</td>
                    <td width="5%">教员名称</td>
                    <td width="5%">家庭住址</td>
                    <td width="5%">联系方式</td>
                    <td width="5%">邮箱</td>
                    <td width="5%">操作</td>
                </tr>
                	  <c:forEach items="${list}" var="temp">
                    <tr>
                        <td>${temp.id}</td>
                        <td>${temp.teacherName}</td>
           				<td>${temp.address}</td>
           				<td>${temp.phone}</td>
           				<td>${temp.email}</td>
                        <td>
                           	<a href="${ctx}/teacher/getById?id=${temp.id}">修改</a>&emsp; 
                             <a onclick="del(${temp.id})">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
             <%@ include file="/pagerBar.jsp" %>
        </div>
    </div>

</div>
</body>
</html>


